<template>
  <el-table
      :data="tableData"
      style="width: 100%"
      @selection-change="handleSelectionChange"
  >
    <el-table-column
        type="selection"
        width="55"
    />
    <el-table-column
        prop="date"
        label="日期"
        width="180"
    />
    <el-table-column
        prop="name"
        label="姓名"
        width="180"
    />
    <!-- 其他列 -->
  </el-table>
</template>
<script lang="ts">
import { ref } from 'vue';

interface TableRow {
  date: string;
  name: string;
  // ... 其他属性 ...
}

export default {
  name: 'MyTable',
  setup() {
    const tableData = ref<TableRow[]>([
      { date: '2023-06-20', name: '张三' },
      { date: '2023-06-21', name: '李四' },
      // ... 其他数据 ...
    ]);
    const multipleSelection = ref<TableRow[]>([]);

    const handleSelectionChange = (val: TableRow[]) => {
      multipleSelection.value = val;

    };

    // ... 其他代码 ...

    return {
      tableData,
      multipleSelection,
      handleSelectionChange,
    };
  },
};
</script>